<%@ page language="java" pageEncoding="UTF-8" import="net.mysoft.framework.util.*,java.util.*,java.io.*"%>
<%@ taglib uri="/struts-tags" prefix="s"%> 
<%
/* System.out.println(new File(System.getProperty("user.dir")));System.out.println(new File(System.getProperty("catalina.home"))); */
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="common/jslib/jquery-1.8.2.min.js" charset="utf-8"></script>
<title>预算系统登录1</title>
	<script type="text/javascript">
	
	$(function(){
		$("#loginName").focus();
		$("#warn").hide();
		$(window).keydown(function(event){
			switch(event.keyCode) {
				case 13:login();
			}
		});
	});
	
	//登陆
	function login() {
		$.ajax({
			url:"login/check.action",
			type:"post",
			data:{
				name:$("#loginName").val(),
				pwd:$("#password").val()
			},
			dataType:"json",
			success:function(data) {
				if(data.isSuccess) {
					window.location = "main/index.action";
				} else {
					$("#warn").show();
				}
			}
		});
	}
	
	</script>
	<style type="text/css">
		body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,
		input,textarea,button,p,blockquote,th,td {margin:0;padding:0;word-wrap:break-word;word-break:break-all;}
		h1,h2,h3,h4,h5,h6{font-size:100%; font-weight:normal;}
		table{border-collapse:collapse; border-spacing:0;}
		caption,cite,em,strong,th {font-style:normal; font-weight:normal;}
		caption, th {text-align:left;}
		fieldset, img {border:0;}
		img {vertical-align:top;}
		ul,ol{list-style:none;}
		input,button,select,textarea{color:#000; font:100% arial; vertical-align:middle; overflow:hidden;}
		label,button{cursor:pointer;}
		a{text-decoration:none;color:#444;}
		.cleardiv{clear:both;font-size:0px;line-height:0px;height:0px}
		
		select {height:20px; line-height:20px;}
		
		a:link{ color:#00000; text-decoration:none;}
		a:hover{color:#db0016;text-decoration:underline;}
		a:active{ color:#999;}
		
		
		body {font-family:Arial,Lucida,Verdana,Helvetica,sans-serif;height:100%;overflow:hidden;font-size:12px;color:#333333; background:url(common/style/images/bg.jpg) center 0; width:100%;}
		.login_main{width:100%;overflow:hidden;}
		.login_box{width:1000px;margin:0 auto;position:absolute;top:50%;left:50%;margin:-120px 0 0 -450px;}
		.logo{float:left; background:url(common/style/images/login_logo3.png); width:595px; height:64px; margin:60px 0 0 0px;}
		.line{float:left; background:url(common/style/images/line.png); width:9px; height:184px; margin-left:30px;}

		fieldset {float:left;bposition: relative;width:250px;margin-top:40px;}
		.sl-account,.ui-btn-cnt{float:left;position: relative; width:250px; margin:15px 0 0 30px; display:inline;}
		label.ui-form-label { float:left;display: block;height: auto; font-size:14px; width:65px;line-height: 12px;margin: 0;padding: 6px 0 8px;text-align: left;}
		.ui-input {border:none;font-size: 12px;height: 24px;width: 160px; background:url(common/style/images/input_box.png); line-height:24px; padding-left:3px;}
		input.btn-login {float:left;background:url(common/style/images/btn.png);border: none;cursor: pointer;display: block;height: 32px;width:77px;margin-left:63px;}
		input.btn2-login {float:left;background:url(common/style/images/btn2.png);border: none;cursor: pointer;display: block;height: 32px;width:77px;margin-left:10px;}
	</style>
</head>
<body>
<div class="login_main">
	<div class="login_box">
   		<!--<div class="logo"></div>
        --><div class="line"></div>
        <fieldset>
         <div class="fm-item ui-form-item sl-account">
             <label for="logonId" class="fm-label ui-form-label">用户名：</label>
             <input type="text" placeholder="" maxlength="100" autocomplete="off" tabindex="1" class="i-text ui-input" value="" id="loginName" ui-form-explain=""/>            
             <div class="ui-form-explain"></div>
         </div>
         <div class="fm-item ui-form-item sl-account">
             <label for="logonId" class="fm-label ui-form-label">密&nbsp;&nbsp;&nbsp;&nbsp;码：</label>
             <input type="password" placeholder="" maxlength="100" autocomplete="off" tabindex="1" class="i-text ui-input" value="" id="password" ui-form-explain=""/>            
             <div class="ui-form-explain"></div>
         </div>
         <div class="fm-item ui-form-item ui-btn-cnt">
         	 <input type="hidden" name="rememberMe" value="true" />
             <input id="btn-submit" type="button" value="" tabindex="4" class="btn-login" seed="B-login-button1" value="登陆" onclick="login();"/>
             <input type="reset" value="" tabindex="4" class="btn2-login" seed="B-login-button1"/>
		</div>
		<div id="warn" style="color: red">用户名或密码错误！！</div>
		<br>
		</fieldset>
    </div>
</div>
</body>
</html>
